gtk_label_clear_layout (label);
gtk_label_ensure_layout (label, TRUE);
-
angle = gtk_label_get_angle (label);
/* Start off with the pixel extents of the rendered layout */
pango_matrix_transform_rectangle (matrix, &required_rect);
pango_matrix_transform_rectangle (matrix, &natural_rect);
- /* Bump the natural size incase of ellipsize to ensure pango has enough space in the angles
- * (note, we could alternatively set the layout to not ellipsize when we know we have been
- * allocated our full natural size, or it may be that pango needs a fix here).
+ /* Bump the natural size in case of ellipsize to ensure pango has
+ * enough space in the angles (note, we could alternatively set the
+ * layout to not ellipsize when we know we have been allocated our
+ * full natural size, or it may be that pango needs a fix here).
*/
if (label->ellipsize && angle != 0 && angle != 90 && angle != 180 && angle != 270 && angle != 360)
{
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
- /* Note, we cant use get_size_for_allocation() when rotating ellipsize labels.
+ /* Note, we cant use get_size_for_allocation() when rotating
+ * ellipsized labels.
*/
if (!(label->ellipsize && label->have_transform) && (angle == 90 || angle == 270))
{
- /* Doing a h4w request on a rotated label here, return the required width for the minimum height. */
- get_size_for_allocation (label, GTK_ORIENTATION_VERTICAL,
+ /* Doing a h4w request on a rotated label here, return the
+ * required width for the minimum height.
+ */
+ get_size_for_allocation (label, GTK_ORIENTATION_VERTICAL,
required_rect.height, minimum_size, natural_size);
}
minimum_width, natural_width);
if (minimum_width)
- minimum_width += label->misc.xpad * 2;
+ *minimum_width += label->misc.xpad * 2;
if (natural_width)
- natural_width += label->misc.xpad * 2;
+ *natural_width += label->misc.xpad * 2;
}
else
GTK_EXTENDED_LAYOUT_GET_IFACE (layout)->get_desired_width (layout, minimum_width, natural_width);
minimum_height, natural_height);
if (minimum_height)
- minimum_height += label->misc.ypad * 2;
+ *minimum_height += label->misc.ypad * 2;
if (natural_height)
- natural_height += label->misc.ypad * 2;
+ *natural_height += label->misc.ypad * 2;
}
else
GTK_EXTENDED_LAYOUT_GET_IFACE (layout)->get_desired_height (layout, minimum_height, natural_height);